package atguigu.newFeature;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class SwitchTest {

	
	public static void main(String[] args) {
		String line = "";
		try {
			System.out.println("输入:");
			InputStreamReader in = new InputStreamReader(System.in);
			BufferedReader rd = new BufferedReader(in);
			line = rd.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
		System.out.println(line);
		
//		switchEnum();
//		switchInt();
	}
	
	
	
	public static void switchInt() {
		int key = 0;
		switch (key) {
		case 0:
			System.out.println("退出系统");
			break;
		default:
			break;
		}
	}
	
	public static void switchEnum() {
		WeekDay wd = WeekDay.Monday;
		switch (wd) {
		case Monday:
			System.out.println("星期一");
			break;
		case Tuesday:
			System.out.println("星期二");
			break;
		case Wednesday:
			System.out.println("星期三");
			break;
		case Thursday:
			System.out.println("星期四");
			break;
		case Friday:
			System.out.println("星期五");
			break;
		case Saturday:
			System.out.println("星期六");
			break;
		case Sunday:
			System.out.println("星期天");
			break;
		default:
			break;
		}
	}
	
	public static void switchString() {
		String select = "a";
		switch (select) {
		case "a":
			System.out.println("a");
			break;
		case "b":
			System.out.println("b");
			break;
		default:
			break;
		}
	}
}
